
package cn.edu.scau.cmi.chenzehan.springFrame.client;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.edu.scau.cmi.chenzehan.springFrame.bean.Student;
import cn.edu.scau.cmi.chenzehan.springFrame.bean.Teacher;

public class SpringClient {

	
	
        public static void main(String[] args) {
			ApplicationContext ctx = new ClassPathXmlApplicationContext("cn/edu/scau/cmi/chenzehan/springFrame/applicationContext.xml");
		    Teacher teacher = (Teacher) ctx.getBean("liangzaoqing");
		   // System.out.println(teacher);
		    
		    Student student = (Student) ctx.getBean("chenzehan");
		    System.out.println(student);

		}		
		
	
}
